﻿using System;
using System.Collections.Generic;
using System.Linq;
using T4Airline.Entities;
using System.Web;

namespace T4Airline.Website
{
	public class RouteData
	{

		// Fields...

	private Airport _ConnectingAirport;
		private double _EstimatedMinutesArrivalDelayed;
		private double _EstimatedMinutesDepartureDelayed;
		private Airline _AirlineSelected;
		private Airport _ArrivalAirport;
		private Airport _DepartureAirport;

		public Airport DepartureAirport
		{
			get { return _DepartureAirport; }
			set { _DepartureAirport = value; }
		}


		public Airport ArrivalAirport
		{
			get { return _ArrivalAirport; }
			set { _ArrivalAirport = value; }
		}


		public Airport ConnectingAirport
		{
			get { return _ConnectingAirport; }
			set { _ConnectingAirport = value; }
		}


		public Airline AirlineSelected
		{
			get { return _AirlineSelected; }
			set { _AirlineSelected = value; }
		}


		public double EstimatedMinutesDepartureDelayed
		{
			get { return _EstimatedMinutesDepartureDelayed; }
			set
			{
				_EstimatedMinutesDepartureDelayed = value;
			}
		}


		public double EstimatedMinutesArrivalDelayed
		{
			get { return _EstimatedMinutesArrivalDelayed; }
			set
			{
				_EstimatedMinutesArrivalDelayed = value;
			}
		}



		public string ChartCaption
		{
			get {

				string caption = AirlineSelected.AirlineName;
				if (ConnectingAirport != null)
					caption += " via " + ConnectingAirport.AirportCode;

				return caption; 
			
			}
			
		}
	
		

	}
}